package edu.kjxy.demo0326;

import java.util.Arrays;

public class demo06 {

	public static void main(String[] args) {
		int[][] a = {
				{10, 10, 10, 10, 10},
				{10, 45, 78, 33, 99},
				{10, 23, 44, 99, 76}
		};
		
		int[] zf = new int[a.length];        //总分
		double[] pjf = new double[a[0].length]; //平均分
		
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				zf[i] += a[i][j];      
				pjf[j] += a[i][j];
			}
		}
		for (int i = 0; i < pjf.length; i++) {
			pjf[i] /= a.length;
		}
		System.out.println(Arrays.toString(zf));
		System.out.println(Arrays.toString(pjf));
	}
}
